package main

import "fmt"

func main() {
	points := [][]int{{1, 1}, {1, 2, 3}}
	fmt.Printf("%T,%v,%v,%d\n", points, points, points[0], points[0][0])

	points[0] = []int{2, 2}
	points[1][1] = 3

	fmt.Println(points)

	fmt.Println(points[0:2])

	for i := 0; i < len(points); i++ {
		for j := 0; j < len(points[i]); j++ {
			fmt.Printf("[%d, %d]: %v\n", i, j, points[i][j])
		}
	}

	for i, line := range points {
		for j, v := range line {
			fmt.Printf("[%d %d]: %v\n", i, j, v)
		}
	}

	points = append(points, []int{2, 3, 1})
	points[0] = append(points[0], 1)
	fmt.Println(points)

	points2 := [][]int{{}, {}}
	copy(points2, points)
	fmt.Println(points2)

}
